﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ComponentModel;
using System.Collections.Generic;
using SLControlLibrary.Resources.Controls.Calendar.OutlookCalendar.Common;
using SLControlLibrary.Resources.Controls.Calendar.OutlookCalendar.BusinessObjects;

namespace SLControlLibrary.Resources.Controls.Calendar.OutlookCalendar.ViewModel
{
    public class OutlookVM : INotifyPropertyChanged
    {
        #region Variables
        private Enumerations.DateView _CurrentDateView = Enumerations.DateView.Day;
        private DateTime _CurrentDate = DateTime.Now;
        private AppointmentList _Appointments = new AppointmentList();
        private DateTime _Appointment_StartDate = DateTime.Now;
        private DateTime _Appointment_EndDate = DateTime.Now;
        private SLControlLibrary.Resources.Common.Enumerations.TimeSlotsPerHour _TimeSlotPerHour = SLControlLibrary.Resources.Common.Enumerations.TimeSlotsPerHour.Fifteen;
        private SLControlLibrary.Resources.Common.Enumerations.HoursPerDay _HoursPerDay = SLControlLibrary.Resources.Common.Enumerations.HoursPerDay.TwentyFour;
        #endregion

        #region Properties
        public Enumerations.DateView CurrentDateView
        {
            get { return _CurrentDateView; }
            set
            {
                if (_CurrentDateView != value)
                {
                    _CurrentDateView = value;
                    OnPropertyChanged("CurrentDateView");
                }
            }
        }
        public DateTime CurrentDate
        {
            get { return _CurrentDate; }
            set
            {
                if (_CurrentDate != value)
                {
                    _CurrentDate = value;
                    OnPropertyChanged("CurrentDate");
                }
            }
        }
        public AppointmentList Appointments
        {
            get { return _Appointments; }
            set
            {
                if (_Appointments != value)
                {
                    _Appointments = value;
                    OnPropertyChanged("Appointments");
                }
            }
        }
        public DateTime Appointment_StartDate
        {
            get { return _Appointment_StartDate; }
            set
            {
                if (_Appointment_StartDate != value)
                {
                    _Appointment_StartDate = value;
                    OnPropertyChanged("Appointment_StartDate");
                }
            }
        }
        public DateTime Appointment_EndDate
        {
            get { return _Appointment_EndDate; }
            set
            {
                if (_Appointment_EndDate != value)
                {
                    _Appointment_EndDate = value;
                    OnPropertyChanged("Appointment_EndDate");
                }
            }
        }
        public SLControlLibrary.Resources.Common.Enumerations.TimeSlotsPerHour TimeSlotsPerHour
        {
            get { return _TimeSlotPerHour; }
            set
            {
                if (_TimeSlotPerHour != value)
                {
                    _TimeSlotPerHour = value;
                    OnPropertyChanged("TimeSlotsPerHour");
                }
            }
        }
        public SLControlLibrary.Resources.Common.Enumerations.HoursPerDay HoursPerDay
        {
            get { return _HoursPerDay; }
            set
            {
                if (_HoursPerDay != value)
                {
                    _HoursPerDay = value;
                    OnPropertyChanged("HoursPerDay");
                }
            }
        }
        #endregion

        #region Event Variables
        public event PropertyChangedEventHandler PropertyChanged;
        #endregion

        #region Methods
        #region OnPropertyChanged
        private void OnPropertyChanged(string PropertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs(PropertyName));
        }
        #endregion
        #endregion
    }
}
